/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class EnvironmentSensor {
    static categoryCode = '010080043';

    static categoryName = '环境传感器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return EnvironmentSensor.categoryCode;
    }

    get categoryName() {
        return EnvironmentSensor.categoryName;
    }

    getAirStatus(params) {
        return command({
            method: 'getAirStatus',
            methodId: 'p1vZ5xAR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCoStatus(params) {
        return command({
            method: 'getCoStatus',
            methodId: 'pZguAyk1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHumidity(params) {
        return command({
            method: 'getHumidity',
            methodId: 'ppAXNOlq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightIntensity(params) {
        return command({
            method: 'getLightIntensity',
            methodId: 'pUPQZjIk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSmokeStatus(params) {
        return command({
            method: 'getSmokeStatus',
            methodId: 'pGoxwiVo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'peH32ffb',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default EnvironmentSensor;
